<!-- index.html -->
<!DOCTYPE html>
<html>
<body>
<button type="button" onclick="callArkTS()">Click Me!</button>
<!-- 点击上传文件按钮 -->
<input type="file" value="file"></br>
<p id="locationInfo">位置信息</p>
<button onclick="getLocation()">获取位置</button>
<p id="demo"></p>
<script>
    function callArkTS() {
        let str = testObjName.test();
        alert("I am an alert box!!")
    }
     function htmlTest() {
        console.info('JavaScript Hello World! ');
    }

    var locationInfo=document.getElementById("locationInfo");
    function getLocation(){
       if (navigator.geolocation) {
          <!-- 前端页面访问设备地理位置 -->
          navigator.geolocation.getCurrentPosition(showPosition);
       }
    }
    function showPosition(position){
       locationInfo.innerHTML="Latitude: " + position.coords.latitude + "<br />Longitude: " + position.coords.longitude;
    }
</script>
</body>
</html>